package com.zhouzhou.fastjava.excel.exception;

import com.google.common.collect.Table;
import org.apache.poi.ss.usermodel.Workbook;

public class ImportException extends Exception {

    private static final long serialVersionUID = 1500958885046809734L;

    private final String originFilename;

    private final Workbook book;

    private final Table<Integer, Integer, String> msgTable;

    public ImportException(String originFilename, Workbook workbook) {
        this.originFilename = originFilename;
        this.book = workbook;
        this.msgTable = null;
    }

    public ImportException(String originFilename, Workbook workbook, Table<Integer, Integer, String> msgTable) {
        super(msgTable.toString());
        this.originFilename = originFilename;
        this.book = workbook;
        this.msgTable = msgTable;
    }

    public String getOriginFilename() {
        return originFilename;
    }

    public Workbook getBook() {
        return book;
    }

    public Table<Integer, Integer, String> getMsgTable() {
        return msgTable;
    }

}
